package com.ruoyi.worker.mapper.v2;

import com.ruoyi.worker.domain.v2.RzAttendanceSumDailyRecordV2Domain;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface RzAttendanceSumDailyRecordV2Mapper {

    /**
     * @author: 陈宇寰
     * @date: 2021-12-27 13:40:55
     * @params:
     * @return:
     * @description: 批量添统计数据
     */
    void multiInsert(List<RzAttendanceSumDailyRecordV2Domain> datas);

    /**
     * @author: 陈宇寰
     * @date: 2021-12-30 11:25:51
     * @params: date-指定日期，groupId-考勤组ID，deptId-班组ID
     * @return:
     * @description: 指定日期、班次统计总数
     */
    List<Map<String, Integer>> totalStatistics(@Param("date") String date,
                                               @Param("groupId") Integer groupId, @Param("deptId") Integer deptId);

    /**
    * @author: 陈宇寰
    * @date: 2022-01-05 09:25:35
    * @params:
    * @return:
    * @description: 考勤确认
    */
    void confirmAttendance(@Param("date") String date,
                           @Param("groupId") String groupId, @Param("deptId") String deptId);

    /**
     * @author: 陈宇寰
     * @date: 2022-01-04 17:28:06
     * @params:
     * @return:
     * @description: 修改统计总值
     */
    void updateRecord(List<RzAttendanceSumDailyRecordV2Domain> records);

    List<RzAttendanceSumDailyRecordV2Domain> recordsWithParams(@Param("date") String date, @Param("groupId") String groupId,
                                                               @Param("deptId") String deptId);
}
